package com.tedu.app.controller;

import com.tedu.checkIn.pojo.dto.RecordParam;
import com.tedu.checkIn.service.RecordService;
import com.tedu.common.response.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/v1/appointment")
@Slf4j
public class AppointmentController {
    @Autowired
    RecordService recordService;
    @PostMapping("/save")
    public JsonResult insertAppointment(RecordParam recordParam){
        log.debug("预约入住,参数:{}",recordParam);
        recordService.saveRecord(recordParam);
        return JsonResult.ok();
    }
}
